

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/hik/doorpoint/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/hik/doorpoint',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/hik/doorpoint/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/hik/doorpoint/' + id,
    method: 'delete'
  })
}
export function controller(doorCode,num) {
  return request({
    url: '/hik/doorpoint/controller',
    method: 'get',
    params: {
      "doorCode":doorCode,
      "num":num
    }
  })
}

export function putObj(obj) {
  return request({
    url: '/hik/doorpoint',
    method: 'put',
    data: obj
  })
}
